package com.ysd.lis.entity.lab;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ysd.lis.entity.BaseEntity;
import com.ysd.lis.entity.BaseEntityJpa;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 不合格原因处理表
 * </p>
 *
 * @author Bai
 * @since 2024-02-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("LAB_REQ_UNQUALIFIED")
@Entity
@Table(name = "LAB_REQ_UNQUALIFIED")
public class LabReqUnqualified extends BaseEntityJpa {

    private static final long serialVersionUID = 1L;

    /**
     * 处理方式
     */
    @TableField("HANDLE_WAY_CODE")
    @Column(name = "HANDLE_WAY_CODE")
    private String handleWayCode;

    /**
     * 处理说明
     */
    @TableField("HANDLE_ILLUSTRATE")
    @Column(name = "HANDLE_ILLUSTRATE")
    private String handleIllustrate;

    /**
     * 说明
     */
    @TableField("ILLUSTRATE")
    @Column(name = "ILLUSTRATE")
    private String illustrate;

    /**
     * 备注
     */
    @TableField("NOTES")
    @Column(name = "NOTES")
    private String notes;

    /**
     * 是否确认
     */
    @TableField("IS_CONFIRM")
    @Column(name = "IS_CONFIRM")
    private String isConfirm;

    /**
     * 确认人
     */
    @TableField("OPERATOR")
    @Column(name = "OPERATOR")
    private String operator;

    /**
     * 确认时间
     */
    @TableField("OPERATOR_TIME")
    @Column(name = "OPERATOR_TIME")
    private Date operatorTime;

    /**
     * 申请主表ID
     */
    @Deprecated
    @TableField("REQ_MAIN_ID")
    @Column(name = "REQ_MAIN_ID")
    private String reqMainId;

    /**
     * 上机记录id
     */
    @Deprecated
    @TableField("LAB_MAIN_ID")
    @Column(name = "LAB_MAIN_ID")
    private String labMainId;


    /**
     * 0标本，1报告
     */
    @TableField("TYPE")
    @Column(name = "TYPE")
    private String type;


    /**
     * 报告单元
     */
    @TableField("RPT_GROUP")
    @Column(name = "RPT_GROUP")
    private String rptGroup;

    /**
     * 检验日期
     */
    @TableField(value = "SAMPLEDA")
    @Column(name = "SAMPLEDA")
    private String sampleda;

    /**
     * 标本号
     */
    @TableField("SAMPLE_NO")
    @Column(name = "SAMPLE_NO")
    private String sampleNo;

    /**
     * 条码号
     */
    @TableField("REQ_NO")
    @Column(name = "REQ_NO")
    private String reqNo;

    /**
     * 来源类型
     */
    @TableField("SOURCE_TYPE")
    @Column(name = "SOURCE_TYPE")
    private String sourceType;


    /**
     * 联系人
     */
    @Column(name = "CONTACT_CODE")
    @TableField("CONTACT_CODE")
    private String contactCode;

    /**
     * 联系人
     */
    @Column(name = "CONTACT_NAME")
    @TableField("CONTACT_NAME")
    private String contactName;
    /**
     * 联系时间
     */
    @Column(name = "CONTACT_TIME")
    @TableField("CONTACT_TIME")
    private Timestamp contactTime;

    @TableField(exist = false)
    @Transient
    private List<String> unqualifiedDetailIds;


    @Column(name = "HANDLE_TIME")
    @TableField("HANDLE_TIME")
    private Timestamp handleTime;

    @Column(name = "HANDLER")
    @TableField("HANDLER")
    private String handler;

    @Column(name = "HANDLE_INFO")
    @TableField("HANDLE_INFO")
    private String handleInfo;


}
